# coding: utf-8
from application import db



class OrderItem(db.Model):
    __tablename__ = 't_order_item'

    id = db.Column(db.BigInteger, primary_key=True, unique=True, comment='序号')
    order_id = db.Column(db.BigInteger, unique=True, comment='订单id')
    userAddress = db.Column(db.String(100), comment='用户地址')
    quantity = db.Column(db.Integer, comment='购买数量')
    price = db.Column(db.Numeric(10, 2), comment='总价格')
    good_id = db.Column(db.BigInteger, comment='商品id')
    note = db.Column(db.String(500), comment='备注信息')
    status = db.Column(db.Integer, comment='状态')
    created_time = db.Column(db.DateTime, nullable=False, comment='创建时间')
    updated_time = db.Column(db.DateTime, nullable=False, comment='更新时间')
